package com.sanjiayi.controller;

import com.sanjiayi.pojo.Kc;
import com.sanjiayi.service.KcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("kc")
public class KcController {
    @Autowired
    private KcService kcService;

    @RequestMapping("findById")
    public Kc findById(Integer id){
        return kcService.findById(id);
    }
    @RequestMapping("add")
    public int add(@RequestBody Kc kc){
        return kcService.add(kc);
    }
}
